home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 37 / Amiga Format CD37 (1999-02-16)(Future Publishing)(GB)(Track 1 of 3)[!][issue 1999-03].iso / -readerstuff- / chris_seward / aio19 / data / ur2 < prev    next >
Text File  |  1999-01-05  |  3KB  |  60 lines

  1.  
  2. {center}
  3. {subhead} RoyalBridge.library{def}{p}
  4. Review by Renne Nissinen
  5. {left}
  6. {p} {p}
  7.  
  8.   This is just excellent. For the end user it's a library that many ARexx
  9. scripts will require in the future (possibly :). And the reason is, that for
  10. the ARexx programmer it's the library that lets them do anything they want!
  11. All the things that are possible with regular compiled programming languages
  12. will now be possible in ARexx. At least if speed is not an issue... :)
  13. {p} {p}
  14.   Installation is quite simple; just copy the library to LIBS: and some data
  15. files somewhere to your HD, and make one assign. After that the non-programmer
  16. person just sits back and enjoys the enhanced abilities of new ARexx scripts
  17. (although I haven't seen many yet).
  18. {p} {p}
  19. * Warning * - now it gets technical :)
  20. {p} {p}
  21.   It is quite simple to use in your own programs, assuming that you know what
  22. to do with the library functions that you suddenly can use :) First you just
  23. open the library in the same way as you open rexxsupport.library for instance.
  24. Then you can call any library function or peek & poke memory. You can open
  25. libraries, call their functions and then close them, or just supply the
  26. library name (prepended with "$") instead of the base address and not worry
  27. about opening or closing the libraries.
  28. {p} {p}
  29.   "But how can I call the library functions?" Well, that's actually a bit
  30. tricky, but at least it's possible :) In the simplest form it's something
  31. like "rbCall('$dos.library $Write',some,arguments,for,write)" for example. The
  32. rbCall() function will open dos.library, look up the library vector offset for
  33. Write() and its parameter data, and pass the supplied parameters to Write().
  34. After it's done, it will close the library automatically and return.
  35. {p} {p}
  36.   RoyalBridge can look up the needed values for functions on the fly, or if
  37. you need more speed you can preload the .rb files (fd style) in the beginning.
  38. Or if you need even more speed (and use a library more than once), you can
  39. open the library yourself and supply the base address instead of its name, and
  40. look up the LVO and parameter data (SAS/C pragmas style) yourself. Of course
  41. you should also convert ARexx strings to c-strings outside time-critical
  42. loops and such, especially if they're needed more than once. But of course it
  43. still won't be staggeringly fast... There's also a preprocessor that will
  44. ease these things for you, if you have the needed files from a C compiler.
  45. {p} {p}
  46.   If you follow so far, you'll understand that you really can call any
  47. library functions from ARexx scripts (exception; the a5 register can't be
  48. used as a parameter - yet :), and you will find much more comprehensive info
  49. in the archive itself. So if there's something that was previously impossible
  50. to do in ARexx, you won't have to write your own rexx function library or
  51. write the whole darn thing in C :)
  52. {p} {p}
  53.   If you skipped here from the start of the tech talk, I'll just advise you to
  54. install it if you ever download and use ARexx scripts anywhere (if you don't,
  55. maybe you should because they make life easier :)
  56. {p} {p}
  57. Available from: Aminet:util/rexx/royalbridge11.lha
  58. {p} {p}
  59. Overall: 93%  ** AIO Gold **
  60.